<template>
  <div id="detail-image">
    <div class="detail-guide">宝贝详情</div>
    <div class="detail-title">{{goodsImage.desc}}</div>
    <div class="detail-images">
      <div v-for="(item, index) in goodsImage.detailImage"
           :key="index">
        <img :src="item" alt="" @load="loadImage">
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "DetailImage",
  props: {
    goodsImage: {
      type: Object,
      default() {
        return {}
      }
    }
  },
  methods: {
    loadImage() {
      this.$bus.$emit('imgLoadEnd');
    }
  }
}
</script>

<style scoped>
 .detail-guide {
   height: 30px;
   line-height: 30px;
   text-align: center;
   border-left: 10px solid var(--color-high-text);
   border-right: 10px solid var(--color-high-text);
   margin-bottom: 5px;
   background-color: #fff;
 }
 .detail-title {
   padding: 20px;
   background-color: #fff;
 }
 .detail-images img {
   width: 100%;
 }
</style>